import request from '@/config/axios'

export interface WechatUserVO {
        id: number
        wechatId: string
        externalWechatId: string
        externalMobile: string
        externalWechatName: string
        addTime: Date
        status: boolean
}

// 查询微信好友列表
export const getWechatUserPage = async (params) => {
    return await request.get({url: `/robot/wechat-user/page`, params})
}

// 查询微信好友详情
export const getWechatUser = async (id: number) => {
    return await request.get({url: `/robot/wechat-user/get?id=` + id})
}

// 新增微信好友
export const createWechatUser = async (data: WechatUserVO) => {
    return await request.post({url: `/robot/wechat-user/create`, data})
}

// 修改微信好友
export const updateWechatUser = async (data: WechatUserVO) => {
    return await request.put({url: `/robot/wechat-user/update`, data})
}

// 删除微信好友
export const deleteWechatUser = async (id: number) => {
    return await request.delete({url: `/robot/wechat-user/delete?id=` + id})
}

// 导出微信好友 Excel
export const exportWechatUser = async (params) => {
    return await request.download({url: `/robot/wechat-user/export-excel`, params})
}